<template>
  <div :style="outModuleCss" class="hotel-search">
    <div :style="moduleBgCss" class="module-bg"></div>
    <div class="address-label">
      <div class="address-info">
        <div class="address" :style="mainColor">洛阳，洛阳理工需要机电工…</div>
        <i class="iconfont icon-arrow-right"></i>
      </div>
      <div class="local-info">
        <span>当前位置</span>
        <i class="iconfont icon-dangqianweizhi"></i>
      </div>
    </div>
    <div class="split-line" :style="lineColor"></div>
    <div class="time-label">
      <div class="time-select">
        <div class="start-time">
          <p class="time-title" :style="mainColor">今天入住</p>
          <p class="time-info">
            <span :style="mainColor">12月18日</span>
            <span :style="subColor">今天</span>
          </p>
        </div>
        <div class="split-time"></div>
        <div class="end-time">
          <p class="time-title" :style="mainColor">明天离店</p>
          <p class="time-info">
            <span :style="mainColor">12月19日</span>
            <span :style="subColor">明天</span>
          </p>
        </div>
      </div>
      <div class="total-time" :style="mainColor">共1晚</div>
    </div>
    <div class="split-line" :style="lineColor"></div>
    <div class="search-label">
      <span :style="subColor">搜索酒店/地名/关键字</span>
    </div>
    <div class="split-line" :style="lineColor"></div>
    <div class="foot-label">
      <div class="search-btn">搜索酒店</div>
    </div>
  </div>
</template>

<script>
import { mixinsModuleCss } from "@/components/DiyNew/diy/mixins/index.js";

export default {
  name: "hotelSearch",
  props: {
    propsData: {
      type: Object,
      default: {},
    },
  },
  mixins: [mixinsModuleCss],
  data() {
    return {};
  },
  mounted() {},
  watch: {},
  computed: {
    mainColor() {
      return { color: this.propsData.params.mainColor };
    },
    subColor() {
      return { color: this.propsData.params.subColor };
    },
    lineColor() {
      return { backgroundColor: this.propsData.params.lineColor };
    },
  },
  methods: {},
};
</script>

<style lang="scss" scoped>
.hotel-search {
  width: 100%;
  position: relative;
  .module-bg {
    width: 100%;
    height: 100%;
    z-index: -1;
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden;
  }

  .address-label {
    width: 100%;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    .address-info {
      flex: 1;
      display: flex;
      align-items: center;
      .address {
        max-width: 80%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 17px;
        font-family: PingFang SC;
        font-weight: 600;
        color: #262626;
      }
      .iconfont {
        color: #cdcdcd;
        font-size: 20px;
      }
    }
    .local-info {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      span {
        font-size: 12px;
        font-family: PingFang SC;
        font-weight: 600;
        color: #f0250e;
      }
      .iconfont {
        color: #f0250e;
        font-size: 19px;
      }
    }
  }
  .split-line {
    width: 93.6%;
    height: 1px;
    background-color: #f8f8f8;
    margin: 0 auto;
  }
  .time-label {
    width: 100%;
    height: 73px;
    padding: 15px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    .time-select {
      display: flex;
      align-items: center;
      .split-time {
        width: 16px;
        height: 2px;
        background: #f2f2f2;
        margin: 0 16px;
      }
      .time-title {
        font-size: 12px;
        font-family: PingFang SC;
        font-weight: 400;
        color: #262626;
        margin-bottom: 2px;
      }
      .time-info {
        display: flex;
        align-items: baseline;
        margin-bottom: 0;
        span:nth-child(1) {
          font-size: 17px;
          font-family: PingFang SC;
          font-weight: 600;
          color: #262626;
          margin-right: 1px;
        }
        span:nth-child(2) {
          font-size: 11px;
          font-family: PingFang SC;
          font-weight: 400;
          color: #8c8c8c;
        }
      }
    }
  }
  .search-label {
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    span {
      font-size: 14px;
      font-family: PingFang SC;
      font-weight: 400;
      color: #8c8c8c;
    }
  }
  .foot-label {
    width: 100%;
    padding: 15px 0;
    .search-btn {
      width: 93.6%;
      height: 40px;
      background: #fa2c1b;
      border-radius: 60px;
      text-align: center;
      line-height: 40px;
      margin: 0 auto;
      font-size: 15px;
      font-family: PingFang SC;
      font-weight: 600;
      color: #ffffff;
    }
  }
}
</style>
